<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="./Public/bt/css/bootstrap.min.css">
</head>
<body>
    <div class="container">
        <div class="alert alert-info" role="alert" style="margin-top: 10px;">文章管理系统</div>
        <table class="table table-hover">
            <tr>
                <td width="50">ID</td>
                <td>标题</td>
                <td>作者</td>
                <td>发布时间</td>
                <td>操作</td>
            </tr>
            <?php foreach($data as $k => $v): ?>
                <tr>
                    <td><?php echo $k ?></td>
                    <td><a href="?a=show&id=<?php echo $k ?>" target="_blank"><?php echo $v['title'] ?></a></td>
                    <td><?php echo $v['author'] ?></td>
                    <td><?php echo date('Y-m-d',$v['sendtime']) ?></td>
                    <td>
                        <a href="?a=edit&id=<?php echo $k ?>" class="btn btn-primary btn-sm">编辑</a>
                        <a href="javascript:if(confirm('确认删除吗？')) location.href='?a=del&id=<?php echo $k ?>'" class="btn btn-danger btn-sm">删除</a>
                    </td>
                </tr>
            <?php endforeach ?>
        </table>
        <a href="?a=add" class="btn btn-primary btn-block">去发布文章</a>
    </div>









</body>
</html>